﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Leo.Core.Abp.Client.Contracts
{
    /// <summary>
    ///     常用树结果对象
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public abstract class TreeResult<T> : ITreeItem<T>
    {
        public Guid Id { get; set; }
        public Guid? ParentId { get; set; }

        public bool HasChildren => Children.Any();

        public List<T> Children { get; set; } = new List<T>();
    }
}
